<?php
/**
 * 订单详情视图类
 */
 class OrderViewModel extends ViewModel {
     
    protected $viewFields = array(
        'orderDetail'  	=>array('amount', 'food' => 'fid', 'total', 'discount', 'price', '_as' => 'od', '_type' => 'left'),
		'order'  		=>array('time', 'store', '_as'=>'o','_on'=>'o.id=od.`order`', '_type' => 'left'),
		'food'  		=>array('name' => 'fname', '_as'=>'f','_on'=>'f.id=od.food', '_type' => 'left'),
		'category'  	=>array('id' => 'cid', 'name' => 'cname', '_as'=>'c','_on'=>'c.id=f.category')
	);
	
 }
 
